package cn.oldsix.spark.core.moviegroom.etl

import org.apache.spark.sql.SparkSession
import org.apache.spark.mllib.recommendation._
/**
  * @ Author : Wu.D.J
  * @ Create : 2017.08.07
  */
object RatingData {
    def main(args: Array[String]): Unit = {
        val spark = SparkSession
                .builder()
                .appName("Rating Data")
                .enableHiveSupport()
                .getOrCreate()
        
        val ratingRDD = spark.sql("select * from train_data").rdd.map(x => Rating(x.getInt(0), x.getInt(1), x.getDouble(2)))
        
    }
}
